<?php echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" xml:lang="en">
<head>
<title><?php echo $title; ?></title>
<base href="<?php echo $base; ?>" />
<script type="text/javascript" src="view/javascript/jquery/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="view/javascript/jquery/ui/jquery-ui-1.8.16.custom.min.js"></script>
<link rel="stylesheet" type="text/css" href="view/javascript/jquery/ui/themes/ui-lightness/jquery-ui-1.8.16.custom.css" />
<link rel="stylesheet" type="text/css" media="screen" href="view/javascript/jquery/elfinder/css/elfinder.min.css">
<link rel="stylesheet" type="text/css" media="screen" href="view/javascript/jquery/elfinder/css/theme.css">
<script type="text/javascript" src="view/javascript/jquery/elfinder/js/elfinder.min.js"></script>
<script type="text/javascript" charset="utf-8">
			$().ready(function() {
				parent.$('#dialog').height(470);
				var elf = $('#elfinder').elfinder({
					url : '/system/library/connector.php',  // connector URL (REQUIRED)
					getFileCallback: function (a) {
					   var b = decodeURIComponent(a.replace('/system/library../../../image/',''));
					   <?php if(!$fckeditor){ ?>
							container: '<?php echo $field ;?>',
			        		parent.$('#<?php echo $field ;?>').attr('value', b);
			        		parent.$('#dialog').dialog('close');
			        		parent.$('#dialog').remove();
					   <?php }else{ ?>
					   		window.opener.CKEDITOR.tools.callFunction(2, a);        		
        					self.close();	
					   <?php }?>
					   
		        	}

					// lang: 'ru',             // language (OPTIONAL)
				}).elfinder('instance');
			});
		</script>
	</head>
	<body>

		<!-- Element where elFinder will be created (REQUIRED) -->
		<div id="elfinder"></div>

	</body>
</html>

</body>
</html>